Sign Function
   HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, the sign function or signum function (from '' signum'',
Latin Latin (, or , ) is a classical language belonging to the Italic branch of the Indo-European languages. Latin was originally a dialect spoken in the lower Tiber area (then known as Latium) around present-day Rome, but through the power of the ...
for "sign") is an
odd Odd means unpaired, occasional, strange or unusual, or a person who is viewed as eccentric. Odd may also refer to: Acronym * ODD (Text Encoding Initiative) ("One Document Does it all"), an abstracted literate-programming format for describing X ...
mathematical function In mathematics, a function from a set to a set assigns to each element of exactly one element of .; the words map, mapping, transformation, correspondence, and operator are often used synonymously. The set is called the domain of the functi ...
that extracts the
sign A sign is an object, quality, event, or entity whose presence or occurrence indicates the probable presence or occurrence of something else. A natural sign bears a causal relation to its object—for instance, thunder is a sign of storm, or me ...
of a
real number In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every real ...
. In mathematical expressions the sign function is often represented as . To avoid confusion with the sine function, this function is usually called the signum function.


Definition

The signum function of a
real number In mathematics, a real number is a number that can be used to measure a ''continuous'' one-dimensional quantity such as a distance, duration or temperature. Here, ''continuous'' means that values can have arbitrarily small variations. Every real ...
is a
piecewise In mathematics, a piecewise-defined function (also called a piecewise function, a hybrid function, or definition by cases) is a function defined by multiple sub-functions, where each sub-function applies to a different interval in the domain. P ...
function which is defined as follows: \sgn x :=\begin -1 & \text x < 0, \\ 0 & \text x = 0, \\ 1 & \text x > 0. \end


Properties

Any real number can be expressed as the product of its
absolute value In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), an ...
and its sign function: x = , x, \sgn x. It follows that whenever is not equal to 0 we have \sgn x = \frac = \frac\,. Similarly, for ''any'' real number , , x, = x\sgn x. We can also ascertain that: \sgn x^n=(\sgn x)^n. The signum function is the
derivative In mathematics, the derivative of a function of a real variable measures the sensitivity to change of the function value (output value) with respect to a change in its argument (input value). Derivatives are a fundamental tool of calculus. F ...
of the absolute value function, up to (but not including) the indeterminacy at zero. More formally, in integration theory it is a
weak derivative In mathematics, a weak derivative is a generalization of the concept of the derivative of a function (''strong derivative'') for functions not assumed differentiable, but only integrable, i.e., to lie in the L''p'' space L^1( ,b. The method ...
, and in convex function theory the
subdifferential In mathematics, the subderivative, subgradient, and subdifferential generalize the derivative to convex functions which are not necessarily differentiable. Subderivatives arise in convex analysis, the study of convex functions, often in connect ...
of the absolute value at 0 is the interval , "filling in" the sign function (the subdifferential of the absolute value is not single-valued at 0). Note, the resultant power of is 0, similar to the ordinary derivative of . The numbers cancel and all we are left with is the sign of . \frac = \sgn x \text x \ne 0\,. The signum function is differentiable with derivative 0 everywhere except at 0. It is not differentiable at 0 in the ordinary sense, but under the generalised notion of differentiation in distribution theory, the derivative of the signum function is two times the Dirac delta function, which can be demonstrated using the identity \sgn x = 2 H(x) - 1 \,, where is the
Heaviside step function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argum ...
using the standard formalism. Using this identity, it is easy to derive the distributional derivative: \frac = 2 \frac = 2\delta(x) \,. The
Fourier transform A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed, ...
of the signum function is \int_^\infty (\sgn x) e^dx = \mathrm\frac, where means
Cauchy principal value In mathematics, the Cauchy principal value, named after Augustin Louis Cauchy, is a method for assigning values to certain improper integrals which would otherwise be undefined. Formulation Depending on the type of singularity in the integrand ...
. The signum can also be written using the Iverson bracket notation: \sgn x = - < 0+ > 0\,. The signum can also be written using the floor and the
absolute value In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), an ...
functions: \sgn x = \Biggl\lfloor \frac \Biggr\rfloor - \Biggl\lfloor \frac \Biggr\rfloor \,.The signum function has very simple definition If 0^0 is accepted to be equal to 1. Then signum can be written for all real numbers as \sgn x = 0^ \left ( - x + \left\vert x \right\vert \right ) - 0^ \left ( x + \left\vert x \right\vert \right ) \,. The signum function coincides with the limits \sgn x=\lim_\frac\,. and \sgn x=\lim_\frac\tan^(nx)\,. For , a smooth approximation of the sign function is \sgn x \approx \tanh kx \,. Another approximation is \sgn x \approx \frac \,. which gets sharper as ; note that this is the derivative of . This is inspired from the fact that the above is exactly equal for all nonzero if , and has the advantage of simple generalization to higher-dimensional analogues of the sign function (for example, the partial derivatives of ). See Heaviside step function – Analytic approximations.


Complex signum

The signum function can be generalized to
complex numbers In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the form a ...
as: \sgn z = \frac for any complex number except . The signum of a given complex number is the
point Point or points may refer to: Places * Point, Lewis, a peninsula in the Outer Hebrides, Scotland * Point, Texas, a city in Rains County, Texas, United States * Point, the NE tip and a ferry terminal of Lismore, Inner Hebrides, Scotland * Point ...
on the
unit circle In mathematics, a unit circle is a circle of unit radius—that is, a radius of 1. Frequently, especially in trigonometry, the unit circle is the circle of radius 1 centered at the origin (0, 0) in the Cartesian coordinate system in the Eucl ...
of the
complex plane In mathematics, the complex plane is the plane formed by the complex numbers, with a Cartesian coordinate system such that the -axis, called the real axis, is formed by the real numbers, and the -axis, called the imaginary axis, is formed by the ...
that is nearest to . Then, for , \sgn z = e^\,, where is the complex argument function. For reasons of symmetry, and to keep this a proper generalization of the signum function on the reals, also in the complex domain one usually defines, for : \sgn(0+0i)=0 Another generalization of the sign function for real and complex expressions is ,Maple V documentation. May 21, 1998 which is defined as: \operatorname z= \begin 1 & \text \mathrm(z) > 0, \\ -1 & \text \mathrm(z) < 0, \\ \sgn \mathrm(z) & \text \mathrm(z) = 0 \end where is the real part of and is the imaginary part of . We then have (for ): \operatorname z = \frac = \frac.


Generalized signum function

At real values of , it is possible to define a
generalized function In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
–version of the signum function, such that everywhere, including at the point , unlike , for which . This generalized signum allows construction of the
algebra of generalized functions In mathematics, generalized functions are objects extending the notion of functions. There is more than one recognized theory, for example the theory of distributions. Generalized functions are especially useful in making discontinuous functions ...
, but the price of such generalization is the loss of
commutativity In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name of ...
. In particular, the generalized signum anticommutes with the Dirac delta function \varepsilon(x) \delta(x)+\delta(x) \varepsilon(x) = 0 \, ; in addition, cannot be evaluated at ; and the special name, is necessary to distinguish it from the function . ( is not defined, but .)


Generalization to matrices

Thanks to the
Polar decomposition In mathematics, the polar decomposition of a square real or complex matrix A is a factorization of the form A = U P, where U is an orthogonal matrix and P is a positive semi-definite symmetric matrix (U is a unitary matrix and P is a positive se ...
theorem, a matrix \boldsymbol A\in\mathbb K^ (n\in\mathbb N and \mathbb K\in\) can be decomposed as a product \boldsymbol Q\boldsymbol P where \boldsymbol Q is a unitary matrix and \boldsymbol P is a self-adjoint, or Hermitian, positive definite matrix, both in \mathbb K^. If \boldsymbol A is invertible then such a decomposition is unique and \boldsymbol Q plays the role of \boldsymbol A's signum. A dual construction is given by the decomposition \boldsymbol A=\boldsymbol S\boldsymbol R where \boldsymbol R is unitary, but generally different than \boldsymbol Q. This leads to each invertible matrix having a unique left-signum \boldsymbol Q and right-signum \boldsymbol R. In the special case where \mathbb K=\mathbb R,\ n=2, and the (invertible) matrix \boldsymbol A = \left begina&-b\\b&a\end\right/math>, which identifies with the (nonzero) complex number a+\mathrm i b=c, then the signum matrices satisfy \boldsymbol Q=\boldsymbol P=\left begina&-b\\b&a\end\right, c, and identify with the complex signum of c, \sgn c = c/, c, . In this sense, polar decomposition generalizes to matrices the signum-modulus decomposition of complex numbers.


See also

*
Absolute value In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), an ...
*
Heaviside function The Heaviside step function, or the unit step function, usually denoted by or (but sometimes , or ), is a step function, named after Oliver Heaviside (1850–1925), the value of which is zero for negative arguments and one for positive argume ...
*
Negative number In mathematics, a negative number represents an opposite. In the real number system, a negative number is a number that is less than zero. Negative numbers are often used to represent the magnitude of a loss or deficiency. A debt that is owed m ...
*
Rectangular function The rectangular function (also known as the rectangle function, rect function, Pi function, Heaviside Pi function, gate function, unit pulse, or the normalized boxcar function) is defined as \operatorname(t) = \Pi(t) = \left\{\begin{array}{rl ...
*
Sigmoid function A sigmoid function is a mathematical function having a characteristic "S"-shaped curve or sigmoid curve. A common example of a sigmoid function is the logistic function shown in the first figure and defined by the formula: :S(x) = \frac = \ ...
(
Hard sigmoid In artificial intelligence, especially computer vision and artificial neural networks, a hard sigmoid is non-smooth function used in place of a sigmoid function. These retain the basic shape of a sigmoid, rising from 0 to 1, but using simpler functi ...
) *
Step function In mathematics, a function on the real numbers is called a step function if it can be written as a finite linear combination of indicator functions of intervals. Informally speaking, a step function is a piecewise constant function having only ...
(
Piecewise constant function In mathematics, a function on the real numbers is called a step function if it can be written as a finite linear combination of indicator functions of intervals. Informally speaking, a step function is a piecewise constant function having only ...
) *
Three-way comparison In computer science, a three-way comparison takes two values A and B belonging to a type with a total order and determines whether A < B, A = B, or A > B in a single operation, in accordance with the mathematical law of trichotomy. Machine ...
*
Zero crossing A zero-crossing is a point where the sign of a mathematical function changes (e.g. from positive to negative), represented by an intercept of the axis (zero value) in the graph of the function. It is a commonly used term in electronics, mathem ...
*
Polar decomposition In mathematics, the polar decomposition of a square real or complex matrix A is a factorization of the form A = U P, where U is an orthogonal matrix and P is a positive semi-definite symmetric matrix (U is a unitary matrix and P is a positive se ...


Notes

{{DEFAULTSORT:Sign Function Special functions Unary operations